﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="JamaicanKitchen._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    WELCOME TO JAMAICAN KITCHEN!!!<br />
&nbsp;&nbsp;
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; One love, One people.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jamaican Kitchen is a website that 
    promotes all about Jamaican recipes, ingerdients and many more..........<br />
    <br />
<br />
    <br />
    <asp:Button ID="Button1" runat="server" Text="Add a Dish" 
            PostBackUrl="~/addNewDish.aspx" Width="100px" />

            
    <br />
    <br />

            
   <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
        <ItemTemplate>
        <a href= "Default.aspx?TagName=<%#Eval("TagName")%>">
        <%#Eval("TagName")%>
        </a> | 
        </ItemTemplate>
        </asp:Repeater>
        <a href="Default.aspx">Display all</a>
        <br />
        <br />
        <br />

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID"  
            AllowSorting="True">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="details.aspx?ID={0}" DataTextField="FoodName" />
                <asp:BoundField DataField="Ingredients" HeaderText="Ingredients" 
                    SortExpression="Ingredients" />
                <asp:BoundField DataField="DirectionToPrepare" HeaderText="DirectionToPrepare" 
                    SortExpression="DirectionToPrepare" />
                <asp:BoundField DataField="ServingSuggestion" HeaderText="ServingSuggestion" 
                    SortExpression="ServingSuggestion" />
                <asp:BoundField DataField="AverageCookingTime" HeaderText="AverageCookingTime" 
                    SortExpression="AverageCookingTime" />
                <asp:BoundField DataField="RatingStars" HeaderText="RatingStars" 
                    SortExpression="RatingStars" />
                <asp:ImageField DataImageUrlField="FoodImage" HeaderText="Thumbnail">
                    <ControlStyle Height="170px" Width="170px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT [FoodName], [FoodImage], [Ingredients], [DirectionToPrepare], [ServingSuggestion], [AverageCookingTime], [RatingStars], [ID] FROM [jamaicankitchen] ORDER BY [ID] DESC">
        </asp:SqlDataSource>
    <br />
    <br />
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            
            
        SelectCommand="SELECT DISTINCT [FoodName], [TagName], [ID], [FoodImage], [Ingredients], [DirectionToPrepare], [ServingSuggestion], [AverageCookingTime], [RatingStars] FROM [TagDishView] WHERE ([TagName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    <p>
        Display these varieties of dishes</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:JamaicanConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:JamaicanConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [TagName] FROM [Tags]"></asp:SqlDataSource>
        
</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:TextBox ID="tb_tagSearch" runat="server" Width="279px"></asp:TextBox>
        <asp:Button ID="btn_tagSearch" runat="server" Height="32px" Text="Button" 
            Width="97px" />
    <br />
</p>>
</asp:Content>
